#ifndef __sensor__ir_h__
#define __sensor__ir_h__

#include <roboard_drivers/adc_val.h>
#include "ir/ir_sensor.h"
#include <sensor/IRInfo.h>

#include "ros/ros.h"
#include <vector>

class IR
{
public:
	IR(int argc, char **argv);
	~IR();

private:
	void addSensors(ros::NodeHandle *nh);	
	void receiveADC(const roboard_drivers::adc_val::ConstPtr &msg);
	bool sensor_info_callback(sensor::IRInfo::Request &req, sensor::IRInfo::Response &res);

	bool simulation;
	int sample_rate;

	ros::ServiceClient distance_client;
	ros::Publisher distance_publisher;
	ros::Subscriber adc_subscriber;
	ros::ServiceServer sensor_info_server_;

	std::vector<IRSensor *> sensors_;
};

#endif